<?php
include_once '../../lib/config_inc.php';
include_once '../../class/function.php';

conectar();

$control=$_GET['variable'];
$subcomision=$_GET['subcomision'];


if($control==1)
{ ?>
	<tr>
		<td colspan="2">
			<table class="centrado" <?php echo $conf_tablas;?> border="0">
       				<tr>	
					<td class="sombra1" style="width:25%">Area</td>
       					<td class="sombra2">

					<select name="areas" id="areas" style="width:35%">
					<option value="0">Seleccione</option>
					<?php 
						$sql="SELECT * FROM t_cman_areas_subcomisiones WHERE id_subcomision=".$subcomision." AND id_area!=0";
						$consulta=ejecutar($sql);
							
						while($filas=pg_fetch_array($consulta)){
						echo "<option value=".$filas["id_area"].">".$filas["nb_area"]."</option>";
					}
					?>
					</select>
		
					</td>
				</tr>
			</table>
		</td>
	</tr>
<?php } ?>
	